
#define MEASURE_PERF

namespace Vibstudio.X4NET.Xml.Comparision
{
#if MEASURE_PERF
    public class XmlDiffPerf
    {
        public int DiffgramGenerationTime { get; set; }

        public int DiffgramSaveTime { get; set; }

        public int HashValueComputeTime { get; set; }

        public int IdenticalOrNoDiffWriterTime { get; set; }

        public int LoadTime { get; set; }

        public int MatchTime { get; set; }

        public int PreprocessTime { get; set; }

        public int TreeDistanceTime { get; set; }

        public int TotalTime
        {
            get
            {
                return LoadTime +
                       HashValueComputeTime +
                       IdenticalOrNoDiffWriterTime +
                       MatchTime +
                       PreprocessTime +
                       TreeDistanceTime +
                       DiffgramGenerationTime +
                       DiffgramSaveTime;
            }
        }

        public void Clean()
        {
            LoadTime = 0;
            HashValueComputeTime = 0;
            IdenticalOrNoDiffWriterTime = 0;
            MatchTime = 0;
            PreprocessTime = 0;
            TreeDistanceTime = 0;
            DiffgramGenerationTime = 0;
            DiffgramSaveTime = 0;
        }
    }
#endif
}